package com.googlecode.dtools.typeinfo.graphviz.bean;

/**
 * Created by IntelliJ IDEA.
 *
 * @author A_Reshetnikov
 * @since Date: 22.05.12 Time: 16:49
 */
public class DmLink {
    private String parent;
    private String child;
    private String name;

    public String getParent() {
        return parent;
    }

    public void setParent(String parent) {
        this.parent = parent;
    }

    public String getChild() {
        return child;
    }

    public void setChild(String child) {
        this.child = child;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DmLink dmLink = (DmLink) o;

        if (!child.equals(dmLink.child)) return false;
        if (!name.equals(dmLink.name)) return false;
        if (!parent.equals(dmLink.parent)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = parent.hashCode();
        result = 31 * result + child.hashCode();
        result = 31 * result + name.hashCode();
        return result;
    }
}
